import React,{ useEffect } from 'react'
import { useRootStore } from "@/store/index.jsx"
import { observer } from 'mobx-react'


const CounterShow = observer(()=> {
  // 使用 useSelector 获取 Redux store 中的 count 值
 
  const { counter , user} = useRootStore();

  useEffect(() => {
    
  }, []);

  return (
    <div>
      <div>Count: {counter.count}</div>
      <div style={{marginTop:'20px'}}>
        <div>User Name: {user.userInfo.name}</div>
        <div>User Age: {user.userInfo.age}</div>
      </div>
    </div>
  );
});

export default CounterShow;